/*
 * @version: 1.0
 * @Author: zhl
 * @Date: 2021-09-06 14:46:16
 * @LastEditors: zhl
 * @LastEditTime: 2021-09-27 16:04:55
 * @Description: file content
 */
#ifndef __MESSAGE_PACKET_H__
#define __MESSAGE_PACKET_H__

#include <unordered_map>
#include <stdint.h>
#include <mutex>
#include <iostream>
#include <memory>

#include "dlt698_frame.h"
#include "CMosquittoManager.h"

class MessagePacket{
public:

    
public:
    MessagePacket(DLT698_FRAME &c_dlt698_frame);
    MessagePacket();
    ~MessagePacket();
    
    void  init();
    void  set_lead_code(uint8_t *lc);
    void  set_scrambling_code(uint8_t sbc);
    void  set_control_code(uint8_t c);
    int   packet_frame(uint8_t *buf, int buf_len, uint8_t *frame, int frame_len);
    int   set_slave_addr(std::string slave_addr);

    
private:
    bool    c_is_lead_code;
    DLT698_FRAME c_dlt698_frame;
};






#endif /* __MESSAGE_PACKET_H__ */